<?php /*a:1:{s:51:"/home/wwwpay/wwpayu/app/api/view/zhaopin/index.html";i:1704954058;}*/ ?>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>帕羽科技-在线简历</title>
	<link rel="stylesheet" href="/static/zhaopin/css/element.css">
	<link rel="stylesheet" href="/static/zhaopin/css/index.css">
	<script src="/static/zhaopin/js/vue.js"></script>
	<script src="/static/zhaopin/js/element.js"></script>
	<script src="/static/zhaopin/js/jquery.js"></script>
</head>
<body>
	<div id="app">
		<div class='title'>帕羽科技-在线简历</div>
		<div class='xuzhi'>填写须知</div>
		<div class='neirong'>
			<p>(一)填写内容</p>
			<span>本部分包含个人情况、教育背景、工作经历、意向确认等内容</span>
		</div>
		<div class='neirong' style='border-bottom:10px solid #f1f1f1;'>
			<p>(二)注意事项</p>
			<span>1、帕羽科技不向任何第三方及公司内部无关人员泄露候选人的个人信息，所有线上资料将严格保管于平台数据库，仅为公司招聘和内部管理使用。</span>
			<span>2、候选人应保证求职过程中填写信息均真实完整。</span>
			<span>3、提交完成后即视作您对招聘岗位有投递意向，我们将尽快在两个工作日内与您联系，进行后序的沟通或笔面试安排。</span>
		</div>
		<div class='biaodan'>
			<el-form :label-width='shouji?"100px":"190px"'>
				<el-form-item label='您应聘的岗位'>
					<el-select v-model="job" @change="jobChange" placeholder='请选择应聘的岗位'>
						<el-option v-for='item in gangwei' :label='item.name'  :value='item.value'></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label='招聘人'>
					<el-select v-model="hr" @change="hrChange" placeholder='请选择招聘人'>
						<el-option v-for='item in zhaopinren' :label='item.name' :value="item.value"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label='招聘信息来源'>
					<el-select v-model="hr_from" @change="hrFromChange" placeholder='请选择招聘信息来源'>
						<el-option v-for='item in laiyuan' :label='item.name' :value='item.value'></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label='应聘渠道' style='border-bottom:10x solid #f1f1f1;'>
					<el-select v-model="pin_from" @change="pinChange" placeholder='请选择应聘渠道'>
						<el-option v-for='item in qudao' :label='item.name' :value='item.value'></el-option>
					</el-select>
				</el-form-item>
				<div class='xinxi'>应聘人基础信息</div>
				<div v-for='(item,index) in list'>
					<div v-if='item.type!="jingli"&&item.type!="duozi"'>
							<p v-if='item.name1 && item.name1 !="教育经历1"' >{{item.name1}}</p>
						<div class='xinxi' v-if='item.name1 && item.name1 =="教育经历1"'>{{item.name1}}</div>
						<div v-if='item.heig' style='height:10px;'></div>
						<el-form-item :label='item.name'>
							<el-input :placeholder='item.placeholder' v-if='item.type=="input"' v-model='item.value' class='shuru'></el-input>
							<el-select :placeholder='item.placeholder' v-if='item.type=="select"' v-model='item.value'>
								<el-option v-for='ite in item.list' :label='ite.name' :value="ite.value"></el-option>
							</el-select>
							<div v-if='item.type=="time"'>
								<el-date-picker type='date' placeholder='请选择日期' value-format="yyyy-MM-dd" v-model='item.date'></el-date-picker>
								<span>-</span>
								<el-time-picker placeholder='请选择时间' value-format="HH" v-model='item.date1'></el-time-picker>
							</div>
							<div v-if='item.type=="time1"'>
								<el-date-picker type='date' placeholder='请选择到岗时间' value-format="yyyy-MM-dd"  v-model='item.date'></el-date-picker>
							</div>
							<div v-if='item.type=="zhaopian"'>
								<div class='zhaopian'>
									<img src='/static/zhaopin/img/shangchuan.png'>
									<p>选择文件(不超过4m)</p>
									<input type='file' id="image"  @change="uploadf">
								</div>
							</div>
						</el-form-item>
<div v-if='item.margintop' style='height:10px;border-bottom:10px solid #f1f1f1;margin-bottom:20px;'></div>
					</div>
					<div v-if='item.type=="jingli"' style='border-bottom:10px solid #f1f1f1;margin-bottom:10px;'>
						<div v-for='(it,inde) in item.list'>
							<div class='xinxi'>
								<div style='float:left;'>{{it.name}}<span v-if='inde>0'>{{inde}}</span></div>
								<div v-if='item.daibiaoxing'>
									<img src='/static/zhaopin/img/tianjia.png' v-if='inde==item.list.length-1' @click='add(index)'>
									<img src='/static/zhaopin/img/shanchu.png' v-if='inde>0' @click='shanchu(index,inde)'>
								</div>
								<div v-else>
									<img src='/static/zhaopin/img/tianjia.png' v-if='inde==item.list.length-1' @click='add1(index)'>
									<img src='/static/zhaopin/img/shanchu.png' v-if='inde>1' @click='shanchu(index,inde)'>
								</div>
							</div>
							<div class='wenzi'>{{it.name1}}</div>
							<el-form-item v-for='ite in it.list' :label='ite.name'>
								<el-input :placeholder='ite.placeholder' v-if='ite.type=="input"' v-model='ite.value' class='shuru'></el-input>
<el-input :placeholder='ite.placeholder' v-if='ite.type=="textarea"' type='textarea' v-model='ite.value' class='shuru'></el-input>
								<el-select :placeholder='ite.placeholder' v-if='ite.type=="select"' v-model='ite.value'>
									<el-option v-for='it in ite.list' :label='it.name' :value="it.value"></el-option>
								</el-select>
								<div v-if='ite.type=="time"'>
									<el-date-picker type='month' placeholder='请选择起始年月'  value-format="yyyy-MM"  v-model='ite.date'></el-date-picker>
									<span>-</span>
									<el-date-picker type='month' placeholder='请选择终止年月' value-format="yyyy-MM"  v-model='ite.date1'></el-date-picker>
								</div>
							</el-form-item>
						</div>
					</div>
					<div v-if='item.type=="duozi"'>
						<div class='duozi'>
							<p>公司运营岗、管培生等项目将对员工投入巨大培养成本，包含员工培训、高管带教、运营款式下单决策等(投入在百万以上)；因此要求投递本项目的候选人对自己的职业发展有清晰的规划，愿意在本行业、本公司、本岗位有至少学习3年以上的计划</p>
							<p>如您在入职后三年内有考公、考编和考研升学行为，将被视作项目签约的重大误解，公司将以最低工资标准支付您的薪酬，并要求您退换前期发放的绩效奖金和补贴。<span>本着相互选择，携手成长的理念，请您慎重选择。如您不接受，我们真诚的祝福你达成目标，下一阶段更好的相遇</span></p>
							<el-form-item>
								<el-select v-model='item.value' placeholder='请选择'>
									<el-option v-for='ite in item.list' :label='ite.name' :value='ite.value'></el-option>
								</el-select>
							</el-form-item>
						</div>
					</div>
				</div>
			</el-form>
			<el-button type='success' @click="sub" style='width:200px;margin:20px auto;display:block;'>提交</el-button>
		</div>
	</div>
	<script>
		var shouji=false
		if(document.body.clientWidth>720){
			shouji=false
		}else{
			shouji=true
		}
		new Vue({
		    el: '#app',
		    data: function() {
				return {
					job:2,
					hr:1,
					hr_from:1,
					pin_from:1,
					photo:'',
					gangwei:[
						{
							name:'电商运营',
							value:1
						},
						{
							name:'电商客服',
							value:2
						},
						{
							name:'供应链专员',
							value:3
						},
						{
							name:'电商设计',
							value:4
						},
						{
							name:'HR-招聘',
							value:5
						},
						{
							name:'HR-绩效',
							value:6
						},
						{
							name:'仓储经理',
							value:7
						},
						{
							name:'董事长助理',
							value:8,
						},
						{
							name:'其他方向',
							value:9
						}
					],
					zhaopinren:[
						{
							name:'伯乐',
							value:1
						},
						{
							name:'曹操',
							value:2
						},
						{
							name:'郭靖',
							value:3
						},
						{
							name:'姜维',
							value:4
						}
					],
					laiyuan:[
						{
							name:'BOSS直聘',
							value:1
						},
						{
							name:'智联',
							value:2
						},
						{
							name:'猎聘',
							value:3
						},
						{
							name:'内推',
							value:4
						},
						{
							name:'猎头',
							value:5
						},
						{
							name:'现场招聘',
							value:6
						},
						{
							name:'其他',
							value:7
						}
					],
					qudao:[
						{
							name:'社招',
							value:1
						},
						{
							name:'校招',
							value:2
						}
					],
					list:[
						{
							name:'您的姓名',
							placeholder:'请输入您的姓名',
							type:'input',
							field:'name',
							value:''
						},
						{
							name:'身份证号',
							placeholder:'请输入您的身份证号',
							type:'input',
							field:'id_card',
							value:''
						},
						{
							name:'性别',
							placeholder:'请选择您的性别',
							type:'select',
							field:'sex',
							list:[
								{
									name:'男',
									value:1
								},
								{
									name:'女',
									value:2
								}
							],
							value:''
						},
						{
							name:'联系电话',
							placeholder:'请输入联系电话',
							type:'input',
							field:'phone',
							value:''
						},
						{
							name:'电子邮箱',
							placeholder:'请输入电子邮箱',
							type:'input',
							field:'email',
							value:''
						},
						{
							name:'生日',
							type:'time',
							field:'birthday',
							date:'2001-01-01',
							date1:'',
							value:''
						},
						{
							name:'身高',
							placeholder:'如1.83m',
							type:'input',
							field:'high',
							value:''
						},
						{
							name:'体重',
							placeholder:'如50KG',
							value:'',
							field:'weight',
							type:'input'
						},
						{
							name:'籍贯',
							placeholder:'请输入籍贯',
							type:'input',
							field:'local',
							value:''
						},
						{
							name:'婚否',
							placeholder:'请选择婚否',
							field:'is_married',
							list:[
								{
									name:'未婚',
									value:1
								},
								{
									name:'已婚',
									value:2
								}
							],
							type:'select',
							value:''
						},
						{
							name1:'教育经历1',
							name:'文理分科',
							placeholder:'请输入文理分科',
							type:'input',
							field:'wlfk',
							value:''
						},
						{
							name:'总分/省排名',
							placeholder:'请输入总分或省排名',
							type:'input',
							field:'zf_pm',
							value:''
						},
						{
							name:'高考数学得分',
							placeholder:'请输入高考数学得分',
							type:'input',
							field:'math_score',
							value:''
						},
						{
							name:'高考语文得分',
							placeholder:'请输入高考语文得分',
							type:'input',
							field:'yw_score',
							value:''
						},
						{
							name:'高考英语得分',
							placeholder:'请输入高考英语得分',
							type:'input',
							field:'english_score',
							value:''
						},
						{
							name:'高考综合得分',
							placeholder:'请输入高考综合科目得分',
							type:'input',
							field:'zonghe_score',
							value:''
						},
						{
							type:'jingli',
							daibiaoxing:1,
							list:[
								{
									name:'教育经历2',
									name1:'填写第一统招学历',
									list:[
										{
											name:'学历',
											type:'input',
											placeholder:'如本科 大专',
											field:'edu',
											value:''
										},
										{
											name:'起止年月',
											type:'time',
											placeholder:'请填写起止年月',
											field:'start',
											value:''
										},
										{
											name:'学校名称',
											type:'input',
											placeholder:'请填写学校名称',
											field:'college_name',
											value:''
										},
										{
											name:'所学专业',
											type:'input',
											placeholder:'请填写所学专业',
											field:'major',
											value:''
										},
										{
											name:'是否毕业',
											placeholder:'请选择是否毕业',
											field:'is_finish',
											list:[
												{
													name:'是',
													value:1

												},
												{
													name:'否',
													value:2
												}
											],
											type:'select',
											value:''
										}
									]
								}
							]
						},
						{
							name:'全系成绩排名',
							type:'input',
							placeholder:'请填写全系成绩排名',
							field:'sort',
							value:''
						},
						{
							name1:'请问您是否有考公、考编和考研升学计划',
							placeholder:'请选择',
							field:'plan',
							list:[
								{
									name:'有',
									value:1
								},
								{
									name:'无',
									value:2
								}
							],
							type:'select',
							value:''
						},
						{
							type:'duozi',
							list:[
								{
									name:'我接受',
									value:1
								},
								{
									name:'我不接受',
									value:2
								}
							],
							field:'is_accept',
							value:''
						},
						{
							type:'jingli',
							list:[
								{
									name:'工作、实习经历(自选代表性)',
									list:[
										{
											type:'time',
											name:'起止年月',
											field:'start',
											value:''
										},
										{
											name:'工作单位',
											type:'input',
											field:'company',
											placeholder:'请输入工作单位',
											value:''
										},
										{
											name:'职务',
											type:'input',
											field:'job',
											placeholder:'请输入职务',
											value:''
										},
										{
											name:'薪资',
											type:'input',
											field:'salary',
											placeholder:'请输入薪资',
											value:''
										},
										{
											name:'离职原因',
											type:'textarea',
											field:'dimission_reason',
											placeholder:'请输入离职原因',
											value:''
										},
										{
											name:'证明人',
											type:'input',
											field:'zmr',
											placeholder:'请输入证明人',
											value:''
										},
										{
											name:'证明人联系方式',
											type:'input',
											field:'zmr_phone',
											placeholder:'请输入证明人联系方式',
											value:''
										},
										{
											name:'企业人数规模',
											type:'input',
											field:'company_people_num',
											placeholder:'请输入企业人数规模',
											value:''
										},
										{
											name:'企业年营业额',
											type:'input',
											field:'turnover',
											placeholder:'请输入企业年营业额',
											value:''
										},
										{
											name:'汇报对象',
											type:'input',
											field:'report',
											placeholder:'请输入汇报对象',
											value:''
										},
										{
											name:'带团队人数',
											type:'input',
											field:'team_people_num',
											placeholder:'请输入带团队人数',
											value:''
										},
										{
											name:'团队/个人业绩',
											type:'input',
											field:'person_get',
											placeholder:'简单说明，尽量数字化',
											value:''
										}
									]
								},
								{
									name:'其他工作实习/经历',
									name1:'可补充,非必选',
									list:[
										{
											type:'time',
											name:'起止年月',
											field:'start',
											value:''
										},
										{
											name:'工作单位',
											type:'input',
											field:'company',
											placeholder:'请输入工作单位',
											value:''
										},
										{
											name:'职务',
											type:'input',
											field:'job',
											placeholder:'请输入职务',
											value:''
										},
										{
											name:'薪资',
											type:'input',
											field:'salary',
											placeholder:'请输入薪资',
											value:''
										},
										{
											name:'离职原因',
											type:'textarea',
											field:'dimission_reason',
											placeholder:'请输入离职原因',
											value:''
										},
										{
											name:'证明人',
											type:'input',
											field:'zmr',
											placeholder:'请输入证明人',
											value:''
										},
										{
											name:'证明人联系方式',
											type:'input',
											field:'zmr_phone',
											placeholder:'请输入证明人联系方式',
											value:''
										}
									]
								}
							]
						},
						{
							name:'期望薪资',
							type:'input',
							field:'salary_1',
							placeholder:'请输入期望薪资(试用期)',
							value:'',
							heig:10
						},
						{
							name:'期望薪资',
							type:'input',
							field:'salary_2',
							placeholder:'请输入期望薪资(转正后)',
							value:'',
							margintop:20
						},
						{
							name:'确认到岗时间',
							type:'time1',
							field:'arrival_time',
							value:''
						},
						{
							name:'请您提供一张生活照片',
							type:'zhaopian',
							field:'life_photo',
							value:''
						}
					],
					shouji:shouji
				}
		    },
			methods:{
				sub(){
					console.log(this.list);
					let list = this.list;
					console.log("length::" + list.length);
						let job = this.job;
						let hr = this.hr;
						let hr_from = this.hr_from;
						let pin_from = this.pin_from;
						let photo = this.photo;
					for (let i = 0; i < list.length; i++) {
						if(list[i].type != 'jingli' && list[i].type != 'time' && list[i].type != 'time1' && list[i].type != 'zhaopian'){
							if(list[i].value == '') {
								this.$message({
									message: list[i].name + '字段不能为空',
									type: 'warning'
								});
								return;
							}
						}
						if(list[i].type == 'time'){
							if(list[i].date == '' || list[i].date1 == '') {
								this.$message({
									message: list[i].name + '字段不能为空',
									type: 'warning'
								});
								return;
							}
						}
						if(list[i].type == 'time1'){
							if(list[i].date == '' ) {
								this.$message({
									message: list[i].name + '字段不能为空',
									type: 'warning'
								});
								return;
							}
						}
						if(list[i].type == 'jingli'){
							var lc = list[i].list;
							console.log(lc);
							for (let ii = 0; ii < lc.length; ii++) {
								var ld = lc[ii].list
								//不等于其他工作实习/经历
								if(lc[ii].name != '其他工作实习/经历') {
									for (let iii = 0; iii < ld.length; iii++) {
										if(ld[iii].type == 'time'){
											console.log(ld[iii]);
											if(ld[iii].date == '' ||ld[iii].date1 == '') {
												this.$message({
													message: ld[iii].name + '字段不能为空',
													type: 'warning'
												});
												return;
											}

										}else{
												if(ld[iii].value == '') {
													this.$message({
														message: ld[iii].name + '字段不能为空',
														type: 'warning'
													});
													return;
												}
										}
									}
								} 

							}
						}
					}
					// console.log(123);
					// return false;
					let l = list[16].list;
				// 	for (let x = 0; x < l.length; x++) {
				// 		var ll = l[x].list
				// 		for (let xx = 0; xx < ll.length; x++) {
				// 			if(ll[xx].value == ''){
				// 				this.$message({
				// 					message: ll[xx].name + '字段不能为空',
				// 					type: 'warning'
				// 				});
				// 							return;
				// 			}
				// 		}
				// 	}
					let l20 = list[20].list;
				// 	for (let cc = 0; cc < l20.length; cc++) {
				// 		var tt = l20[cc];
				// 		for (let yy = 0; yy < tt.list.length; yy++) {
				// 			var uu = tt.list[yy];
				// 			if(uu.value == ''){
				// 				this.$message({
				// 					message: uu.name + '字段不能为空',
				// 					type: 'warning'
				// 				});
				// 				return;
				// 			}
				// 		}
				// 	}
					
					var that = this
						$.ajax({
						async: true,
						url: '/Zhaopin/save',
						type: 'post',
						data : { list : list ,job:job,hr:hr,hr_from:hr_from,pin_from,photo:photo},
						dataType: 'json',
						timeout: 30000,
						success: function(res){
							if(res.code == 1){
								that.$message({
									message: '提交成功',
									type: 'warning'
								});
							}else{
								that.$message({
									message: res.msg,
									type: 'warning'
								});
							}
						},
						error: function(res){

						},


					})
				},
				uploadf(e){
					var that = this;
					let formData = new FormData();
					formData.append("image" , $("#image")[0].files[0]);
					// console.log(formData);
					$.ajax({
						async: true,
						url: '/Zhaopin/upload',
						type: 'post',
						data: formData,
						processData: false,
						contentType: false,
						dataType: 'json',
						timeout: 30000,
						success: function(res){
							// console.log(res.data.url);
							that.photo = res.data.url
							that.$message({
									message: '照片上传成功',
									type: 'success'
								});
						},
						error: function(res){

						}})
				},
				jobChange(e){
					// console.log(e)
					this.job=e;
				},
				hrChange(e){
					// console.log(e)
					this.hr=e;
				},
				hrFromChange(e){
					// console.log(e)
					this.hr_from=e;
				},
				pinChange(e){
					// console.log(e)
					this.pin_from=e;
				},

				add(index){
					var a={
						name:'教育经历',
						name1:'填写其他统招学历/研究生学历',
						type:'jingli',
						list:[
							{
								name:'学历',
								type:'input',
								placeholder:'请填写学历',
								field:'edu',
								value:''
							},
							{
								name:'起止年月',
								type:'time',
								placeholder:'请填写起止年月',
								field:'start',
								value:''
							},
							{
								name:'学校名称',
								type:'input',
								placeholder:'请填写学校名称',
								field:'college_name',
								value:''
							},
							{
								name:'所学专业',
								type:'input',
								placeholder:'请填写所学专业',
								field:'major',
								value:''
							},
							{
								name:'是否毕业',
								placeholder:'请选择是否毕业',
								field:'is_finish',
								list:[
									{
										name:'是',
										value:1

									},
									{
										name:'否',
										value:2
									}
								],
								type:'select',
								value:''
							}
						]
					}
					this.list[index].list.push(a)
				},
				shanchu(index,inde){
					this.list[index].list.splice(inde,1)
				},
				add1(index){
					var a={
						name:'其他工作实习/经历',
						list:[
							{
								type:'time',
								name:'起止年月',
								field:'start',
								value:''
							},
							{
								name:'工作单位',
								type:'input',
								field:'company',
								placeholder:'请输入工作单位',
								value:''
							},
							{
								name:'职务',
								type:'input',
								field:'job',
								placeholder:'请输入职务',
								value:''
							},
							{
								name:'薪资',
								type:'input',
								field:'salary',
								placeholder:'请输入薪资',
								value:''
							},
							{
								name:'离职原因',
								type:'input',
								field:'dimission_reason',
								placeholder:'请输入离职原因',
								value:''
							},
							{
								name:'证明人',
								type:'input',
								field:'zmr',
								placeholder:'请输入证明人',
								value:''
							},
							{
								name:'证明人联系方式',
								type:'input',
								field:'zmr_phone',
								placeholder:'请输入证明人联系方式',
								value:''
							}
						]
					}
					this.list[index].list.push(a)
				}
			}
		})
	</script>
</body>
</html>